// link prediction
// (c) Yongjin Park

#ifndef PREDICT_HSBLOCK_MODEL_HH_
#define PREDICT_HSBLOCK_MODEL_HH_

#include "btree.hh"
#include "btree_io.hh"
#include "distrib.hh"
#include "sparse_data.hh"
#include "sparse_io.hh"
#include "cnetwork.hh"


#include <iostream>

#include <boost/lexical_cast.hpp>
// #include <boost/ptr_container/ptr_vector.hpp>
// #include <boost/function.hpp>
// #include <unistd.h>
// #include <algorithm>
// #include "random.hh"
// #include <vector>

using namespace std;

#ifdef DEGREE_CORRECT
typedef btree_t<poisson_t> model_tree_t;
#else
typedef btree_t<bernoulli_t> model_tree_t;
#endif

void
predict( const model_tree_t& Tree,       // tree model
	 const collapsible_network_t& G, // training network
	 const sp_stat_mat_t& Z );        // latent assignment

void
print_help();

boost::shared_ptr< sp_stat_mat_t >
read_latent_mat( const char* fname );

#endif
